package com.atguigu.gmall.scheduled.spring;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class ScheduledDemo {

    /**
     * initialDelay：初始定时任务延迟时间
     * fixedDelay/fixedRate：每隔一定周期执行定时任务
     * cron表达式
     */
    //@Scheduled(cron = "0/35 * * * * *")
    public void test(){
        System.out.println("这是spring方法实现了定时任务" + System.currentTimeMillis());
    }
}
